<?php
 /**
  * CategoryController
  */
 NAMESPACE Admin\Controller;
 USE Think\Controller;
 class CategoryController extends CommonController{
 	/**
 	 * [lst 商品分类]
 	 * @return [type] [description]
 	 */
	public function lst(){
		$category=D('Category');
		$categoryInfo=classify($category->select(),'pid');
		$this->assign('categoryInfo',$categoryInfo);
		$this->display();
	}	
	/**
	 * [append 添加分类]
	 * @return [type] [description]
	 */
	public function append(){

	}
	/**
	 * [del 删除分类]
	 * @return [type] [description]
	 */
	public function del(){

	}
	/**
	 * [edt 修改分类]
	 * @return [type] [description]
	 */
	public function edt(){

	}
	/**
	 * [recycle 回收站]
	 * @return [type] [description]
	 */
	public function recycle(){

	}
	public function show(){
		$id=I('post.id');
		$is_show=I('post.is_show');
		$category=D('Category');
		if($is_show==1){
			if($category->where("id=$id")->setField('is_show',0)) echo 1;
		}elseif($is_show==0){
			if($category->where("id=$id")->setField('is_show',1)) echo 1;
		}
	}
 }
     